<?php

function lonex_js_alter(&$javascript) {
  $javascript['misc/jquery.js']['data'] = drupal_get_path('theme', 'lonex') . '/js/jquery.js';
}

/**
 * Add body classes if certain regions have content.
 */
function lonex_preprocess_html(&$variables) {

  drupal_add_js(path_to_theme() . '/js/bootstrap.js');
  drupal_add_js(path_to_theme() . '/js/jquery.1_8.js');
//  drupal_add_js('http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js');
  //drupal_add_js(path_to_theme() . '/js/jquery.mousewheel.js');
  drupal_add_js(path_to_theme() . '/js/jquery.dragscroll.js');


}

function lonex_process_page(&$variables) {
  if (drupal_is_front_page()) {
    $variables['title']="";
    unset($variables['page']['content']['system_main']['default_message']);
  }
}


//function lonex_menu_tree($variables) {
//  return '<ul class="nav">' . $variables['tree'] . '</ul>';
//}

function lonex_menu_link(array $variables) {
  $element = $variables['element'];
  $sub_menu = '';

  if ($element['#below']) {
    $sub_menu = drupal_render($element['#below']);
  }
  $output = l($element['#title'], $element['#href'], $element['#localized_options']);
  return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . '</li>';
}

//  <li class="divider-vertical"></li>
